package com.xiaobai.zhuangxiuguanjia.model;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by gggcccwww on 2015/6/16.
 */
public class Data {
    private String mCase;
    private String cname;
    private String distance;
    private String headPhoto;
    private String id;
    private String isCollection;
    private int isFallCity;
    private String koubei;
    private String latitude;
    private String longitude;
    private String mouth;
    private int security;
    private String viewnums;

    public String getmCase() {
        return mCase;
    }

    public void setmCase(String mCase) {
        this.mCase = mCase;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public String getDistance() {
        return distance;
    }

    public void setDistance(String distance) {
        this.distance = distance;
    }

    public String getHeadPhoto() {
        return headPhoto;
    }

    public void setHeadPhoto(String headPhoto) {
        this.headPhoto = headPhoto;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getIsCollection() {
        return isCollection;
    }

    public void setIsCollection(String isCollection) {
        this.isCollection = isCollection;
    }

    public int getIsFallCity() {
        return isFallCity;
    }

    public void setIsFallCity(int isFallCity) {
        this.isFallCity = isFallCity;
    }

    public String getKoubei() {
        return koubei;
    }

    public void setKoubei(String koubei) {
        this.koubei = koubei;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getMouth() {
        return mouth;
    }

    public void setMouth(String mouth) {
        this.mouth = mouth;
    }

    public int getSecurity() {
        return security;
    }

    public void setSecurity(int security) {
        this.security = security;
    }

    public String getViewnums() {
        return viewnums;
    }

    public void setViewnums(String viewnums) {
        this.viewnums = viewnums;
    }

    public void parseJSON(JSONObject json){
        if (json != null) {
            try {
                mCase=json.getString("case");
                cname=json.getString("cname");
                distance=json.getString("distance");
                headPhoto=json.getString("headPhoto");
                id=json.getString("id");
                isCollection=json.getString("isCollection");
                koubei=json.getString("koubei");
                latitude=json.getString("latitude");
                longitude=json.getString("longitude");
                mouth=json.getString("mouth");
                viewnums=json.getString("viewnums");
                isFallCity=json.getInt("isFallCity");
                security=json.getInt("security");
            } catch (JSONException e) {
                e.printStackTrace();
            }
        }
    }

    @Override
    public String toString() {
        return "Data{" +
                "mCase='" + mCase + '\'' +
                ", cname='" + cname + '\'' +
                ", distance='" + distance + '\'' +
                ", headPhoto='" + headPhoto + '\'' +
                ", id='" + id + '\'' +
                ", isCollection='" + isCollection + '\'' +
                ", isFallCity=" + isFallCity +
                ", koubei='" + koubei + '\'' +
                ", latitude='" + latitude + '\'' +
                ", longitude='" + longitude + '\'' +
                ", mouth='" + mouth + '\'' +
                ", security=" + security +
                ", viewnums='" + viewnums + '\'' +
                '}';
    }
}
